home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cspotrun.arc / DIRWIN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-06-20  |  768 b   |  43 lines

  1. /* RDP - 4/22/86 */
  2.  
  3. #include <csrdos.h>
  4.  
  5. dirwin(path,name)
  6.  char *path;
  7.  char *name;
  8.  {
  9.   struct DIRS buf;
  10.   int win;
  11.   char *temp;
  12.   int row = 0;
  13.   int col = 0;
  14.   win = wopen(10,13,20,67,1);
  15.   sprintf(temp,"[ Dir: %s\\%s ]",path,name);
  16.   wtitle(win,temp,1);
  17.   wmessage(win,"[ Press a Key ]",0);
  18.   ffirst(path,&buf,name,0);
  19.   while ( 1 )
  20.    {
  21.     if ( row == 9 )
  22.      {
  23.       row = 0;
  24.       ++col;
  25.       if ( col == 4 )
  26.        {
  27.         getch();
  28.         wcls(win);
  29.         row = col = 0;
  30.        }
  31.      }
  32.     wgotoxy(win,row,col*13);
  33.     wprint(win,buf.name);
  34.     ++row;
  35.     if ( fnext(path,&buf,name,0) == 18 )
  36.      { 
  37.       getch();
  38.       break;
  39.      }
  40.    }
  41.   wclose(win);
  42.  }
  43.